package com.laizhenghua.payment.service.impl;

import com.laizhenghua.commons.entity.PaymentEntity;
import com.laizhenghua.payment.dao.PaymentDao;
import com.laizhenghua.payment.service.PaymentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @description:
 * @date: 2022/1/1 18:16
 */
@Service(value = "paymentService")
public class PaymentServiceImpl implements PaymentService {
    @Autowired
    private PaymentDao paymentDao;

    @Override
    public Integer create(PaymentEntity entity) {
        return paymentDao.create(entity);
    }

    @Override
    public PaymentEntity getPaymentById(Integer id) {
        PaymentEntity paymentEntity = paymentDao.getPaymentById(id);
        if (paymentEntity == null) {
            return null;
        }
        return paymentEntity;
    }

}
